<template>
  <div class="indexComTop indexComTop2 clear_float">
  	<div class="c_name">
        <!-- <span v-bind:class="{ active: isActive }" class="fa fa-thumb-tack" @click="thumb"></span> -->
  		<span>{{des.name}}</span> 
  	</div>
    <div class="c_close" @click="close">
  		<!-- <i class="fa fa-close"></i> -->
          ×
  	</div>
  	<div class="c_time">
  		{{des.time}}
  	</div>
  </div>
</template>

<script>
export default {
    props:["des"],

	data() {
		return {
            isActive:false,
			headerChoose: [
				{
					name: "首页",
					path: "index",
					active: true
				},
			]
		}
    },
    methods:{
        refreshAll(){

		},
        thumb(e){
            this.isActive=!this.isActive;
            if(this.isActive){
                $(e.target).parents(".indexComTop2").removeClass("indexComTop")
            }else{
                $(e.target).parents(".indexComTop2").addClass("indexComTop")
            }
        },
        close(){
            this.$emit('closep')
        }

    },
    mounted() {
        // $("#drag").sortable({revert:true});
        // //console.log(this.des)
    },
}
</script>

<style lang="less">
    .clear_float{
        clear: both;
        display: block;
        content: "";
    }
    .indexComTop2{
        position: relative;
        // background:linear-gradient(rgba(63, 131, 205, .19), rgba(135, 182, 236, .02));
        // width:225px;
        // height:25px;
        background:rgba(0,0,0,0.05);
        height: 50px;
        padding: 6px 0px;
        &>.c_name{
            float: left;
            color: #ABFFFF;
            font-weight: bold;
            padding: 6px 10px;
            background:rgba(0,0,0,0.2);
            border: 1px solid #2A5C77;
            span{
                padding: 7px 10px;
                cursor: pointer;
                font-size: 15px;
                display: inline-block;
                background:rgba(255,255,255,0.1);
            }
            .active{
                color: #4eff37;
            }
        }
        &>.c_time{
            position: absolute;
            right: 12px;
            bottom: 12px;
            font-size: 12px;
            color:rgba(255,255,255,0.8);
        }
        &>.c_close{
            position: absolute;
            top: 0;
            right: 6px;
            font-size: 22px;
            cursor: pointer;
            display: none;;
            &:hover{
                color: #4eff37;
            }
        }
    }
</style>
